<?php
/**
 * RUBIK IT Solution & Development Co.ltd,
 *
 * PROJECT		: Auction
 * COPYRIGHT	: 2010
 * ------------------------------------------------------
 * 
 * DTO class of  #__model table
 *
 * @author			generator <hoadn@rubik.com.vn>
 * @access			public
 * @package			dbo.ModelDTO
 *
 * Created on	: September 13, 2010
 */

// Importer
RCoreImporter::cls( "dbo.AbstractDTO" );

/**
 * @name ModelDTO
 * The data transfer object class for table: #__model
 */
class ModelViewDTO extends AbstractDTO {

	// Keys
	var $model_id	= "N*|||key";
	
	// Colums
//	var $name			= "S*||mo";
	var $model_group	= "S*||mo";
	var $model_detail	= "S||mo";
	var $maker_id		= "N*||mo";
	var $maker_name		= "S||mk|name";
	
	/**	
	 * Constructor	
	 *	
	 * @param string $where	 the where string (without WHERE)
	 * @param string $orderBy the other by string (with order by)
	 * @param DataBase $db the database (if null the database of system will be specify)
	 */	
	function __construct($where='', $orderBy = '', $db = null) {	
		parent::__construct('FROM model mo 
							LEFT JOIN maker mk ON mo.maker_id = mk.maker_id', ' mk.deleted=0 AND mo.deleted=0 ', $orderBy, $db);
	}	
}
?>